home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / psetting / pseval.exe / _SETUP.1 / SimpMain.pas < prev   
Encoding:
Pascal/Delphi Source File  |  1997-10-16  |  1.6 KB  |  74 lines

  1. unit SimpMain;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   Menus, PSetting, StdCtrls, ExtCtrls;
  8.  
  9. type
  10.   TfrmMain = class(TForm)
  11.     frmsMain: TPFormSettings;
  12.     MainMenu1: TMainMenu;
  13.     mniFile: TMenuItem;
  14.     mniFileExit: TMenuItem;
  15.     mniHelp: TMenuItem;
  16.     mniHelpAbout: TMenuItem;
  17.     edtStud: TEdit;
  18.     cbxQuestion: TCheckBox;
  19.     ListBox1: TListBox;
  20.     RadioGroup1: TRadioGroup;
  21.     Label1: TLabel;
  22.     Button1: TButton;
  23.     dlgFont: TFontDialog;
  24.     procedure mniFileExitClick(Sender: TObject);
  25.     procedure mniHelpAboutClick(Sender: TObject);
  26.     procedure Button1Click(Sender: TObject);
  27.     procedure ListBox1Click(Sender: TObject);
  28.     procedure FormShow(Sender: TObject);
  29.   private
  30.     { Private declarations }
  31.   public
  32.     { Public declarations }
  33.   end;
  34.  
  35. var
  36.   frmMain: TfrmMain;
  37.  
  38. implementation
  39.  
  40. uses About;
  41.  
  42. {$R *.DFM}
  43.  
  44. procedure TfrmMain.mniFileExitClick(Sender: TObject);
  45. begin
  46.     Close;
  47. end;
  48.  
  49. procedure TfrmMain.mniHelpAboutClick(Sender: TObject);
  50. begin
  51.     frmAbout.ShowModal;
  52. end;
  53.  
  54. procedure TfrmMain.Button1Click(Sender: TObject);
  55. begin
  56.     dlgFont.Font.Assign( Label1.Font );
  57.     if ( dlgFont.Execute = TRUE ) then
  58.     begin
  59.         Label1.Font.Assign( dlgFont.Font );
  60.     end;
  61. end;
  62.  
  63. procedure TfrmMain.ListBox1Click(Sender: TObject);
  64. begin
  65.     frmsMain['List_Item_Index'].AsInteger := Listbox1.ItemIndex;
  66. end;
  67.  
  68. procedure TfrmMain.FormShow(Sender: TObject);
  69. begin
  70.     Listbox1.ItemIndex := frmsMain['List_Item_Index'].AsInteger;
  71. end;
  72.  
  73. end.
  74.